package com.basic.modules.nykf.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.basic.common.annotation.DictParam;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.math.BigDecimal;
import java.util.Date;

@Data
@TableName("n_ykf_renew")
public class RenewListEntity {

    private static final long serialVersionUID = 1L;

    public RenewListEntity() {
    }

    public RenewListEntity(CustomerShopBusinessEntity customerShopBusinessEntity, String ddlx,String zfztVal,String xfztVal) {
        this.customerShopBusinessId = customerShopBusinessEntity.getCustomerShopBusinessId();
        this.ddlxVal = ddlx;
        this.ddlxName = ddlx;
        this.fwlxVal = customerShopBusinessEntity.getFwlxVal();
        this.fwlxName = customerShopBusinessEntity.getFwlxName();
        this.fwbcVal = customerShopBusinessEntity.getFwbcVal();
        this.fwbcName = customerShopBusinessEntity.getFwbcName();
        this.sfmsVal = customerShopBusinessEntity.getSfmsVal();
        this.ywdx = customerShopBusinessEntity.getYwdx();
        this.tcds = customerShopBusinessEntity.getTcds();
        this.zxl = customerShopBusinessEntity.getZxl();
        this.ywksrq = customerShopBusinessEntity.getYwkssj();
        this.ywjsrq = customerShopBusinessEntity.getYwjssj();
        this.sfkpVal = customerShopBusinessEntity.getSfkpVal();
        this.sfkpName = customerShopBusinessEntity.getSfkpName();
        this.zfztVal = zfztVal;
        this.zfztName = zfztVal;
        this.xfztVal = xfztVal;
        this.xfztName = xfztVal;
    }

    /**
     * 主键
     */
    @TableId
    private Long id;

    /**
     * 业务ID
     */
    private Long customerShopBusinessId;

    /**
     * 客户ID
     */
    private Long customerId;

    /**
     * 订单类型(字典)-val
     */
    private String ddlxVal;

    /**
     * 订单类型(字典)-name
     */
    @DictParam(field = "ddlxVal", targetField = "ddlxName", dictType = "ddlx")
    private String ddlxName;

    /**
     * 服务类型(字典)-val
     */
    private String fwlxVal;

    /**
     * 服务类型(字典)-name
     */
    @DictParam(field = "fwlxVal", targetField = "fwlxName", dictType = "customType")
    private String fwlxName;

    /**
     * 服务班次(字典)-val
     */
    private String fwbcVal;

    /**
     * 服务班次(字典)-name
     */
    @DictParam(field = "fwbcVal", targetField = "fwbcName", dictType = "serviceShift")
    private String fwbcName;

    /**
     * 收费模式(分组)-val
     */
    private String sfmsVal;

    /**
     * 业务底薪
     */
    private BigDecimal ywdx;

    /**
     * 提成点数
     */
    private BigDecimal tcds;

    /**
     * 咨询量
     */
    private Integer zxl;

    /**
     * 业务开始日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date ywksrq;

    /**
     * 业务结束日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date ywjsrq;

    /**
     * 续费日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date xfrq;


    /**
     * 是否开票(字典)-val
     */
    private String sfkpVal;

    /**
     * 是否开票(字典)-name
     */
    @DictParam(field = "sfkpVal", targetField = "sfkpName", dictType = "sfkp")
    private String sfkpName;

    /**
     * 发票类型(字典)-val
     */
    private String fplxVal;

    /**
     * 发票类型(字典)-name
     */
    @DictParam(field = "fplxVal", targetField = "fplxName", dictType = "fplx")
    private String fplxName;

    /**
     * 票面税点(字典)-val
     */
    private String pmsdVal;

    /**
     * 票面税点(字典)-name
     */
    @DictParam(field = "pmsdVal", targetField = "pmsdName", dictType = "pmsd")
    private String pmsdName;

    /**
     * 支付状态(字典)-val
     */
    private String zfztVal;

    /**
     * 支付状态(字典)-name
     */
    @DictParam(field = "zfztVal", targetField = "zfztName", dictType = "zfzt")
    private String zfztName;

    /**
     * 续费状态(字典)-val
     */
    private String xfztVal;

    /**
     * 续费状态(字典)-name
     */
    @DictParam(field = "xfztVal", targetField = "xfztName", dictType = "xfzt")
    private String xfztName;

    /**
     * 用于绑定支付的批次ID
     */
    private String batchId;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    /**
     * 客户名称
     */
    @TableField(exist = false)
    private String khmc;

    /**
     * 店铺名称
     */
    @TableField(exist = false)
    private String dpmc;

    /**
     * 业务名称
     */
    @TableField(exist = false)
    private String ywmc;

    /**
     * 用于分组合并
     */
    @TableField(exist = false)
    private String mergeGrouping;
}